//
//  TitleButtion.swift
//  swft_weibo
//
//  Created by mac on 15/9/11.
//  Copyright © 2015年 mac. All rights reserved.
//

import UIKit

class TitleButtion: UIButton {
    
    init(){
        super.init(frame: CGRectMake(1, 1, 1, 1))
        
        setTitle("极客江南  ", forState: UIControlState.Normal)
        setImage(UIImage(named: "navigationbar_arrow_down"), forState: UIControlState.Normal)
        setImage(UIImage(named: "navigationbar_arrow_up"), forState: UIControlState.Selected)
        sizeToFit()
    
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    override func layoutSubviews() {
        
        super.layoutSubviews()
        
        
        
        titleLabel?.frame.origin.x=0

        imageView?.frame.origin.x=(titleLabel?.frame.size.width)!
        

        
        
    }

}
